 using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Data;

public partial class demo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        OleDbConnection conn;
        string conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|/Proekt.mdb;";
        conn = new OleDbConnection(conString);
        conn.Open();
        string sel = "Select IME from IGRACI ";
        OleDbCommand cmdSelect = new OleDbCommand(sel, conn);
        OleDbDataReader reader1 = cmdSelect.ExecuteReader();
        while (reader1.Read())
        {
            ddl.Items.Add(reader1["IME"].ToString());
        }
        reader1.Close();
        conn.Close();
    }
    protected void presmetaj_danok(object sender, EventArgs e)
    {
        proekt25 p = new proekt25();

        int vrednost = p.presmetka(ddl.SelectedValue);
        
        if (vrednost > 200)
        {
            Panel1.Controls.Clear();
            suma.Text = "Треба да платите 200$";
        }
        else
        {
            Panel1.Controls.Clear();
            suma.Text = "Треба да платите " + vrednost + "$";
        }
    }

    protected void pocetna(object sender, EventArgs e)
    {
        Response.Redirect("demo.aspx");
    }
}